You can use an OLE programmatic identifier (sometimes called a ProgID) to create an Automation object. The following tables list OLE programmatic identifiers for ActiveX controls, Microsoft Office applications, and Microsoft Office Web Components.
Microsoft Office Web Components
To create the ActiveX controls listed in the following table, use the corresponding OLE programmatic identifier.
To create this control | Use this identifier |
---|---|
CheckBox | Forms.CheckBox |
ComboBox | Forms.ComboBox |
CommandButton | Forms.CommandButton |
Frame | Forms.Frame |
Image | Forms.Image |
Label | Forms.Label |
ListBox | Forms.ListBox |
MultiPage | Forms.MultiPage |
OptionButton | Forms.OptionButton |
ScrollBar | Forms.ScrollBar |
SpinButton | Forms.SpinButton |
TabStrip | Forms.TabStrip |
TextBox | Forms.TextBox |
ToggleButton | Forms.ToggleButton |
To create the Microsoft Access objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Access available on the machine where the macro is running.
To create this object | Use one of these identifiers |
---|---|
Application | Access.Application |
CurrentData | Access.CodeData |
CurrentProject | Access.CodeProject |
DefaultWebOptions | Access.DefaultWebOptions |
To create the Microsoft Excel objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Excel available on the machine where the macro is running.
To create this object | Use one of these identifiers | Comments |
---|---|---|
Application | Excel.Application | |
Workbook | Excel.AddIn | |
Workbook | Excel.Chart | Returns a workbook containing two worksheets; one for the chart and one for its data. The chart worksheet is the active worksheet. |
Workbook | Excel.Sheet | Returns a workbook with one worksheet. |
To create the Microsoft Graph objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Graph available on the machine where the macro is running.
To create this object | Use one of these identifiers |
---|---|
Application | MSGraph.Application |
Chart | MSGraph.Chart |
To create the Microsoft Office Web Components objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Microsoft Office Web Components available on the machine where the macro is running.
To create this object | Use one of these identifiers |
---|---|
ChartSpace | OWC.Chart |
DataSourceControl | OWC.DataSourceControl |
ExpandControl | OWC.ExpandControl |
PivotTable | OWC.PivotTable |
RecordNavigationControl | OWC.RecordNavigationControl |
Spreadsheet | OWC.Spreadsheet |
To create the Microsoft Outlook object given in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Outlook available on the machine where the macro is running.
To create this object | Use one of these identifiers |
---|---|
Application | Outlook.Application |
To create the Microsoft PowerPoint object given in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of PowerPoint available on the machine where the macro is running.
To create this object | Use one of these identifiers |
---|---|
Application | PowerPoint.Application |
To create the Microsoft Word objects listed in the following table, use one of the corresponding OLE programmatic identifiers. If you use an identifier without a version number suffix, you create an object in the most recent version of Word available on the machine where the macro is running.
To create this object | Use one of these identifiers |
---|---|
Application | Word.Application |
Document | Word.Document, Word.Template |
Global | Word.Global |